﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Wpf_Test1
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            int num = 1;
            int num2 = 2;
            int num3 = num + num2;
            TextToal.Text = num3.ToString();
            //点击时间后重新让结果显示
           TextToal.Visibility=Visibility.Visible;
        }
        //鼠标移入
        private void Button_MouseEnter(object sender, MouseEventArgs e)
        {
            TextToal.Text = "鼠标以进入范围";
            //点击时间后重新让结果显示
            TextToal.Visibility = Visibility.Visible;
        }
        //鼠标移出
        private void Button_MouseLeave(object sender, MouseEventArgs e)
        {
            TextToal.Text = "鼠标以移出范围";
            //点击时间后重新让结果显示
            TextToal.Visibility = Visibility.Visible;
        }
    }
}
